import java.util.PriorityQueue;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: AliceMana
 * Date: 2023-01-07
 * Time: 22:09
 */
public class Test {
    public static void main(String[] args) {
        PriorityQueue<Integer> queue = new PriorityQueue<>();

        queue.offer(1);
        queue.offer(1);
        queue.offer(2);

        while (!queue.isEmpty()) {
            System.out.println(queue.poll());
        }
    }
}
